<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'  %>
<!DOCTYPE html >
<html>
	<head>
		<title>Job Hunter - liste des contacts</title>
	</head>
	<body>

		<div id="breadcrumb">
			<a href="/main" >accueil</a> >
			<a href="/contactsList" >contact</a>
			 > liste des contacts
		</div>
<article class="article12">
			<h1>Contacts List</h1><a href="addContact"><%@ include file="/img/addB.svg"%></a>
			<table class="dataTable display compact" >
				<thead>
					<tr>
						<th>Id</th>
						<th>First Name</th>
						<th>Last Name</th>
						<th>Company</th>
						<th>Function</th>
						<th>Phone</th>
						<th>Email</th>
						<th>Description</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${contactsList}" var="contact">
						<tr>
							<td>${contact.id }</td>
							<td>${contact.firstName }</td>
							<td>${contact.lastName }</td>
							<td>${contact.company.name }</td>
							<td>${contact.function }</td>
							<td>${contact.phone }</td>
							<td>${contact.email }</td>
							<td>${contact.description }</td>
							<td>
								<a href="contact?id=${contact.id }"><%@ include file="/img/seeB.svg"%></a>
								<a href="updContact?id=${contact.id }"><%@ include file="/img/updB.svg"%></a>
								<a href="delContact?id=${contact.id }"><%@ include file="/img/delB.svg"%></a>
							</td>
						</tr>
					</c:forEach>	
				</tbody>			
			</table>
			
		</article>
	</body>
</html>